package com.example.sqldemo.test;

import java.util.ArrayList;
import java.util.List;

public class Order {

    public <E> List<E> copyFromArray(E[] array){
        List<E> list = new ArrayList<>();
        for (E e : array) {
            list.add(e);
        }
        return list;
    }

    public <E> void  setArray1  (E[] array){
        List<E> list = new ArrayList<E>();
        for (E e : array) {
            list.add(e);
        }
    }

    public <T> void  setArray2  (Object[] array){
        List<T> list = new ArrayList<>();
        for (Object e : array) {
            list.add((T)e);
        }
    }
}
